<#setting number_format=",###.###">
<style  type="text/css" id="printStyle">

#pageHead,#printHead,#tableArea,#remark,#printFooter,#pageFooter{
    font-family: Times New Roman;
    line-height: 22px;
    font-size: 12px;
}

td,tr,talbe {
    margin: 0;
    padding: 0;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    border-spacing: 0 !important;
    *border-collapse: expression('separate', cellSpacing =   '0px');/
    border-spacing: expression(this.cellSpacing = 0);
}

td,th {
    display: table-cell;
    vertical-align: inherit;
}

table th,table td {
    text-align: left;
}

.printTable {
    width: 100%;
    margin: 0;
    padding: 0;
}

.printTable td, div{
    word-wrap:break-word;
    word-break:break-all;
}

.printTable tr {
    width: 100%;
}
.printLine td{
    font-weight: bold;
}
.printTable .printLine td {
    line-height: 30px;
    border-top: 1px solid gray;
    border-bottom: 1px solid gray;
}
</style>
<div id="pageHead" style="width: 740px;">
    <div style="height: 100px">
        <div style="width: 180px;float: left;">
            <img alt="" src="${staticDomain}images/system/logo/logo-middle.jpg" width="180"/>
        </div>
        <div style="line-height: 30px; font-size:${fontSize}em;font-weight:bolder; text-align: center;width:620px;float: left;margin-left:100px;margin-top: -80px;">${entity.company.name!}</div>
        <div style="line-height: 30px; text-align: center;font-size:${fontSize-0.2}em;width:400px;float: right;margin: -30px 115px 0;">PACKING LIST</div>
    </div>  
</div>
<div id="printHead" style="width: 700px;">
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:15px;" class="printTable">
        <tbody> 
            <tr>
                <td width="5%">To</td>
                <td width="45%">:${entity.customer.name }</td>
                <td width="12%" style="vertical-align: top;">P/I No.</td>
                <td width="38%" style="font-weight:bolder;">:${orderNo!}</td>
            </tr>
            <tr>
                <td style="vertical-align: top;">Add</td>
                <td style="vertical-align: top;">:${entity.customer.address}</td>
                <td>Packing No</td>
                <td>:${entity.no!}</td>
            </tr>
            <tr>
                <td>Tel</td>
                <td>:${entity.customer.linkTelephone!}</td>
                <td>Invoice No</td>
                <td>:${entity.commercialInvoiceNo!}</td>
            </tr>
            <tr>
                <td>Fax</td>
                <td>:${entity.customer.fax!}</td>
                <td>Date</td>
                <td>:${entity.packingDate?string("yyyy-MM-dd")}</td>
            </tr>
            <tr>
                <td rowspan="6" style="vertical-align: top;">Attn</td>
                <td rowspan="6" style="vertical-align: top;">:${entity.customer.linkPerson}</td>
                <td>Ship Name</td>
                <td>:${entity.shipName}</td>
            </tr>
            <tr>
               <td>BL No</td>
               <td>:${entity.blNo!}</td>
            </tr>
            <tr>
                <td>Seal No</td>
                <td>:${entity.sealNo!}</td>
            </tr>
            <tr>
                <td>Container</td>
                <td>:${entity.containerNo!}</td>
            </tr>
            <tr>
                <td>ETA Date</td>
                <td>:<#if entity.eta??>${entity.eta?string("yyyy-MM-dd")}</#if></td>
            </tr>
            <tr>
                <td style="vertical-align: top;">Client PO No</td>
                <td>:${clientPoNo!}</td>
            </tr>
        </tbody>
    </table>
</div>
<div id="tableArea">
    <table class="printTable" style="margin-top: 15px;">
        <thead>
            <tr class="printLine">
                <td width="15%">Description</td>
                <td width="10%">Pallet No.</td>
                <td width="10%">Quantity</td>
                <td width="15%">Product No.</td>
                <td width="10%">Packages</td>
                <td width="10%">Unit</td>
                <td width="10%">N.W.</td>
                <td width="10%">G.W.</td>
                <td width="10%">CBM</td>
            </tr>
        </thead>
        <tbody>
            <#list orderItems as item>
            <tr>
                <td style="text-align: left;">${item.description!}</td>
                <td style="text-align: left;">${item.palletNo!}</td>
                <td style="text-align: left;">${item.quantity!}</td>
                <td style="text-align: left;">${item.productNo!}</td>
                <td style="text-align: left;">${item.packages}</td>
                <td style="text-align: left;">${item.packageUnit!}</td>
                <td style="text-align: left;">${item.netWeight * item.packages}</td>
                <td style="text-align: left;">${item.grossWeight * item.packages}</td>
                <td style="text-align: left;">${item.measurement!}</td>
            </tr>
            </#list>
            <tr class="printLine">
                <td colspan="2"
                    style="width: 90%; text-align: right;"><font
                    style="font-size: large; font-weight: bold;">TOTAL:</font></td>
                <td style="text-align: left;">${entity.totalQuantity}</td>
                <td style="text-align: left;">&#160;</td>
                <td style="text-align: left;">${entity.totalPackages}</td>
                <td style="text-align: left;">&#160;</td>
                <td style="text-align: left;">${entity.totalNetWeight}</td>
                <td style="text-align: left;">${entity.totalGrossWeight}</td>
                <td style="text-align: left;">${entity.totalMeasurement}</td>
            </tr>
        </tbody>
    </table>
</div>
<div id="remark" style="text-align: left;">
     Marks:<br/>
     <div style="min-height: 100px;text-align: left;margin-top: 15px;" class="announcementCon">
       ${entity.remark!}
    </div>
    For and on behalf of<br/>
    <div style="height: 20px;text-align: left;margin-top: 15px;" class="announcementCon">
       ${entity.company.name!}
    </div>
</div>